home *** CD-ROM | disk | FTP | other *** search
/ Visual Basic Controls / Visual Basic Controls.iso / vbcontrol / vbec20 / setup.exe / file0015.bin (.txt) < prev    next >
Encoding:
Visual Basic Form  |  1999-01-23  |  1.7 KB  |  58 lines

  1. VERSION 5.00
  2. Begin VB.Form Sample 
  3.    Caption         =   "Sample"
  4.    ClientHeight    =   2868
  5.    ClientLeft      =   48
  6.    ClientTop       =   276
  7.    ClientWidth     =   3900
  8.    LinkTopic       =   "Form1"
  9.    ScaleHeight     =   2868
  10.    ScaleWidth      =   3900
  11.    StartUpPosition =   3  'Windows Default
  12.    Begin VB.CommandButton Command2 
  13.       Caption         =   "Object Errors"
  14.       Height          =   468
  15.       Left            =   1536
  16.       TabIndex        =   2
  17.       Top             =   2328
  18.       Width           =   1404
  19.    End
  20.    Begin VB.TextBox Text1 
  21.       BackColor       =   &H8000000F&
  22.       Height          =   2100
  23.       Left            =   216
  24.       Locked          =   -1  'True
  25.       MultiLine       =   -1  'True
  26.       TabIndex        =   1
  27.       Text            =   "Sample.frx":0000
  28.       Top             =   168
  29.       Width           =   3612
  30.    End
  31.    Begin VB.CommandButton Command1 
  32.       Caption         =   "Div by 0"
  33.       Height          =   468
  34.       Left            =   216
  35.       TabIndex        =   0
  36.       Top             =   2328
  37.       Width           =   1092
  38.    End
  39. Attribute VB_Name = "Sample"
  40. Attribute VB_GlobalNameSpace = False
  41. Attribute VB_Creatable = False
  42. Attribute VB_PredeclaredId = True
  43. Attribute VB_Exposed = False
  44. Option Explicit
  45. Private Sub Command1_Click()
  46.     Dim a As Double, b As Double, c As Double
  47.     a = 18
  48.     ' Division by 0 error!! (I forgot to initialize b :)) )
  49.     c = a / b
  50.     MsgBox "C=" & c
  51. End Sub
  52. Private Sub Command2_Click()
  53.     Dim obj As Object
  54.     ' Some object errors...
  55.     Set obj = CreateObject("ThisObject.DoesNotExist")
  56.     obj.UnknownProperty = "Hello"
  57. End Sub
  58.